﻿using System;
using System.Data.Services;

namespace AstoriaPlus
{
	public interface IEntityInterceptor<TDataService, TDataSource>
		where TDataService : DataService<TDataSource>
		where TDataSource : class
	{
		TDataSource DataSource { get; set; }
		object Entity { get; set; }
		TDataService Service { get; set; }
		UpdateOperations UpdateOperations { get; set; }

		void Execute();
	}

	public interface IEntityInterceptor<TDataService, TDataSource, TEntity> : IEntityInterceptor<TDataService, TDataSource>
		where TDataService : DataService<TDataSource>
		where TDataSource : class
		where TEntity : class
	{
		new TEntity Entity { get; set; }
	}
}
